package com.ruoyi.fly.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.fly.domain.AppletWithdraw;
import com.ruoyi.fly.domain.vo.AppletWithdrawSearchVo;
import com.ruoyi.fly.domain.vo.AppletWithdrawUpdateVo;
import com.ruoyi.fly.service.AppletWithdrawService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wdf
 * @Date: 2024/6/15
 */
@RestController
@RequestMapping("/appletWithdraw")
@Api(tags = "提现管理")
public class AppletWithdrawController extends BaseController {

    @Autowired
    private AppletWithdrawService appletWithdrawService;

    /**
     * 查询提现列表
     */
    @PostMapping("/selectAppletWithdrawList")
    @ApiOperation(value = "查询提现列表")
    public R<AppletWithdraw> selectAppletWithdrawList(@RequestBody AppletWithdrawSearchVo appletWithdrawSearchVo) {
        return appletWithdrawService.selectAppletWithdrawList(appletWithdrawSearchVo);
    }

    /**
     * 提现审核
     */
    @PostMapping("/updateAppletWithdraw")
    @ApiOperation(value = "提现审核")
    public R updateAppletWithdraw(@RequestBody AppletWithdrawUpdateVo appletWithdrawUpdateVo) {
        return appletWithdrawService.updateAppletWithdraw(appletWithdrawUpdateVo);
    }
}
